﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.components.mainmenu {
    import reprise.ui.*;

    public class AbstractTabView extends UIComponent {

        protected var m_scrollPane:ScrollPane;
        protected var m_placeholders:Array;
        protected var m_numberOfVisibleItems:int = 6

        public function AbstractTabView(){
            this.m_placeholders = [];
            super();
        }
        public function addPlaceholders():void{
            var _local2:uint;
            var _local3:int;
            var _local1:uint = this.m_scrollPane.numberOfItems;
            if (_local1 < this.m_scrollPane.numberOfVisibleItems){
                _local2 = (this.m_scrollPane.numberOfVisibleItems - _local1);
                _local3 = 0;
                while (_local3 < _local2) {
                    this.addPlaceholder();
                    _local3++;
                };
            };
        }
        public function removePlaceholders():void{
            var _local1:PlaceholderScrollItem;
            var _local2:int = this.m_placeholders.length;
            while (_local2--) {
                _local1 = this.m_placeholders[_local2];
                this.m_scrollPane.removeItem(_local1);
            };
            this.m_placeholders = [];
        }
        public function isScrollPaneScrolling():Boolean{
            return (this.m_scrollPane.isScrolling);
        }
        public function get numberOfVisibleItems():int{
            return (this.m_numberOfVisibleItems);
        }
        public function reset():void{
            this.m_scrollPane.reset();
        }
        override protected function createChildren():void{
            this.m_scrollPane = ScrollPane(addChild(new ScrollPane(this.m_numberOfVisibleItems)));
        }
        protected function addPlaceholder():void{
        }

    }
}//package net.wooga.pets.views.components.mainmenu 
